#include "Animation.h"

Animation::Animation()
{

}

Animation::Animation(string name, vector<Image*> images, float frameTime)
{
	Animation::images = images;
	Animation::frameTime = frameTime;

	Animation::totalFrames = images.size();

	Animation::currentFrame = 0;

	setName(name);
}

void Animation::setCurrentFrame(unsigned int n)
{
	currentFrame = n;
}

Animation* Animation::SearchAnimation(vector<Animation*> animations, string name)
{
	for (int k = 0; k < animations.size(); k++)
	{
		if (animations.at(k)->getName().compare(name) == 0)
			return animations.at(k);
	}
}

void Animation::setName(string s)
{
	name = s;
}

